import {createRouter, createWebHistory,createWebHashHistory} from "vue-router";

import Dashboard from '@/views/Dashboard.vue';  //拓扑图
import test from '@/views/test/test.vue';  //拓扑图
import electrical from "@/views/electrical.vue";  // 电气元器件管理
import collectdata from "@/views/collectdata.vue";  // 采集数据
import alarmmanage from "@/views/alarmmanage.vue";  // 告警管理
import svgpage from "@/views/svgVue.vue"; //测试文件svg

import newtuopu from "@/views/newtuopu.vue"; //测试文件svg
import tuopu from "@/views/tuopu.vue"; //测试新
const router = createRouter({
  // vue3路由必须指定工作模式
  // history: createWebHistory(),
  history: createWebHashHistory(),
  // 定义规则和vue2一样
  routes: [
      {
          path: '/dashboard',
          name: 'dashboard',
          component: test
      },
     {
      path: '/dashboard1',
      name: 'dashboard1',
      component: Dashboard
    },
    {
      path:'/electrical',
      name:'electrical',
      component:electrical
    },
    {
        path:'/collectdata',
        name:'collectdata',
        component:collectdata
    },
    {
        path:'/alarmmanage',
        name:'alarmmanage',
        component:alarmmanage
    },
    {
      path:'/svgpage',
      name:'svgpage',
      component:svgpage
    },
    {
      path:'/newtuopu',
      name:'newtuopu',
      component:newtuopu
    },
    {
      path:'/tuopu',
      name:'tuopu',
      component:tuopu
    }
  ]  
}   
)
export default router; //以router暴露出去